import base from './base';
import services from '@/axios';

const scriptAPI = {
  //发布便签
  postNote(data) {
    return services.post(`${base.test}/note`, data);
  },

  //获取用户个人便签
  getUserNote(userId, startIndex, size){
    return services.get(`${base.test}/note/user`, {params: {userId, startIndex, size}})
  },

  //根据分类id获取分类下的标签
  getTypeScript(startIndex, size, columnId){
    return services.get(`${base.test}/note/column`, {params: {startIndex, size, columnId}})
  },

  //根据便签id获取便签详细信息
  getScriptInfo(id){
    return services.get(`${base.test}/note/${id}`)
  },
}

export default scriptAPI;